<style>
	select{
		height: 30px !important;
		padding: 2px !important;
	}
</style>
<div class="row">

	<div class="alert alert-notice">
		Schedule For Section : <strong><?= ucwords($section->section_name);?></strong>
	</div>
	<fieldset>
		<legend>Menu</legend>
		<a href="<?php echo site_url('rss-section/')?>" class="data-link">Back to Sections</a> | 
		<a href="<?php echo site_url('rss-add-schedule/'.$section_id)?>" class="add">Add Schedule</a>
	</fieldset>
	
	<fieldset>
		<legend>Descritption</legend>
	<?if(isset($system_message))echo $system_message;?>
	
	<?if(!empty($schedules)):?>
		<?=form_open('')?>
		<table class="data-table">
			<thead class="tabular-head">
			<tr>
				<th>Subject ID</th>
				<th>Subject</th>
				<th>Teacher</th>
				<th>Time From</th>
				<th>Time To</th>
				<th>Day</th>
				<th>Action</th>
			</tr>
			</thead>
			<tbody class="tabular">

			<?foreach($schedules as $s):?>
				<?//vp($s);?>
				<tr>
					<td><?=$s->subj_uniq_id;?></td>
					<td><?=$s->subj_desc;?></td>
					<td><?=form_dropdown("sched[$s->schedule_id][teacher_id]", $teachers,$s->tid);?></td>
					<td><input type="text" name="sched[<?=$s->schedule_id;?>][time_from]" class="time" style="width:100px;" maxlength="5" value="<?=$s->time_from;?>"></td>
					<td><input type="text" name="sched[<?=$s->schedule_id;?>][time_to]" class="time" style="width:100px;" maxlength="5" value="<?=$s->time_to;?>"></td>
					<td><input type="text" name="sched[<?=$s->schedule_id;?>][day]" value="<?=$s->day;?>"></td>
					<td><a tabindex="-1" href="<?=site_url('room_section_subject/delete_schedule/'.$s->schedule_id.'/'.$section_id);?>" class="btn btn-danger btn-mini confirm"><i class="fa fa-trash-o"></i>&nbsp;</a> 
					<!-- | <a href="<?=site_url('rss-update-schedule/'.$s->schedule_id.'/'.$section_id);?>" class="data-link">Update</a></td> -->
				</tr>
			<?endforeach;?>
			</tbody>
		</table>
		<button class="btn btn-primary pull-right" value="update_schedule" name="update_schedule" ><i class="fa fa-upload"></i>&nbsp; Update Schedule</button>
		<?else:?>
			<div class="notice"> No Subjects set on this section </div>
		<?endif;?>
	</fieldset>

	</div>
